rvm `require': no such file to load -- rubygems (LoadError)

Posted by xxd on Stack Overflow See other posts from Stack Overflow or by xxd
Published on 2014-06-13T15:20:23Z Indexed on 2014/06/13 15:24 UTC
Read the original article Hit count: 202

Filed under:

run a ruby code got error "rvm `require': no such file to load -- rubygems (LoadError)"

bash-3.2$ rvm --default ruby-2.0.0-p451

-bash-3.2$ rvm list  

rvm rubies

=* ruby-2.0.0-p451 [ x86_64 ]

-bash-3.2$ gem list --local        

*** LOCAL GEMS ***

bigdecimal (1.2.0)
bundler (1.5.3)
bundler-unload (1.0.2)
executable-hooks (1.3.1)
gem-wrappers (1.2.4)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
net-ssh (2.9.1)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
rubygems-bundler (1.4.2)
rvm (1.11.3.9)
test-unit (2.0.0.0)

-bash-3.2$ gem list --local rubygems

*** LOCAL GEMS ***

rubygems-bundler (1.4.2)

to run the script:

ruby test.rb
`require': no such file to load -- rubygems (LoadError)

$ cat test.rb

require 'rubygems'
require 'net/ssh'

Net::SSH.start(.............

what's going on? please advice. thanks

© Stack Overflow or respective owner

Related posts about ruby